home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 515 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: news.sprintlink.net!datalytics!news
  2. From: Rob Stewart <stew@datalytics.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: New C++ developers struggling with source configuration
  5. Date: 4 Jan 1996 21:17:45 GMT
  6. Organization: Datalytics, Inc
  7. Message-ID: <4chg5p$ldg@gold.datalytics.com>
  8. References: <4ccfkd$7f5@azizia.dtm-corp.com>
  9. NNTP-Posting-Host: pc071.datalytics.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. pierce@dtm-corp.com (Pierce Krouse) wrote:
  16. >We have a configuration problem brewing here where I work.  We have a
  17. >SCCS-based source code control system which has worked well in
  18. >developing C applications for unix platforms.  We have library and
  19. >application program source directories.  We are starting to develop
  20. >C++ classes and applications.  The big question is whether libraries
  21. >are the way to share classes between application programs, or if there
  22. >is a better way to let application programs get to class objects.  We
  23. >would prefer to have the Makefile that builds a given application
  24. >retrieve an object file rather than the source file (even though it is
  25. >all controlled under source code control).  The problem is
  26. >containment: several classes inherit or contain other classes, so we
  27. >cannot just give the application program a single object file -- or
  28. >can we?
  29. >
  30.  
  31. If all you want is code reuse, a static library is your 
  32. answer.  If you want run-time sharing of the object code, you 
  33. need to use your OS's shared library mechanism.  For example, 
  34. under MS Windows, you share object code via DLLs.  UNIX System 
  35. V uses shared libraries.
  36.  
  37. Put the class headers in a common location, and put the 
  38. corresponding libraries in another common location.  Now, you 
  39. maintain the libraries and headers under SCCS with dedicated 
  40. makefiles.  Each app, then, is dependent upon the libraries it 
  41. uses.  Only the object code for the app is dependent upon the 
  42. class headers.
  43.  
  44. Now, every team member can reuse the object code by linking 
  45. with the appropriate library for the classes the app uses, and 
  46. the class code is compiled only by the library makefiles.
  47.  
  48. -- 
  49. Robert Stewart        | My opinions are usually my own.
  50. Datalytics, Inc.
  51. (513)226-7700
  52. stew@datalytics.com
  53.  
  54.  
  55.